﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SdlDotNet.Graphics;
using SdlDotNet.Graphics.Sprites;

namespace Pokemon
{
    class Global
    {
        public static Random Random = new Random();
        public static Surface MainSurface;
        public static SurfaceCollection Tileset = new SurfaceCollection();
        public static List<Atom> Everything = new List<Atom>();

        static string[] TypeChart = new string[]{ 
        "222221201222222222",
        "421124104222214242",
        "242221421224122222",
        "222111210224222222",
        "220424124421422222",
        "214212421422224222",
        "211122211124242242",
        "022222241222242212",
        "222224221112124222",
        "222221424114224122",
        "222244222411222122",
        "221144121141222122",
        "224202222241122122",
        "242422221222212202",
        "224242221114224222",
        "222222221222222422",
        "212222241222242212",
        "222222222222222222", //No-Type Margin
        };

        public static void Init()//TODO
        {
            LoadGFX();
        }

        public static void LoadContent()//TODO
        {
        }

        public static void LoadGFX()//TODO
        {
            Tileset.Add(@"Content/GFX/Tileset.png", new System.Drawing.Size(16, 16));
            //TODO MORE
        }

        public static double GetTypeEffect(PokeType attack, PokeType defend)
        {
            return double.Parse(TypeChart[(int)attack][(int)defend].ToString()) / 2;
        }
    }
}
